<!DOCTYPE html>
<html lang="en">
	<head>
		<title> New Document </title>
		<meta charset="utf-8">
		<meta name="Author" content="">
		<meta name="Keywords" content="">
		<meta name="Description" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<!-- Bootstrap -->
		<link href="${webRoot}resources/css/bootstrap.min.css" rel="stylesheet" media="screen">
		<link href="${webRoot}resources/css/style.css" rel="stylesheet">
		<script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
		<style type="text/css">
		.black_overlay{
		display: none;
		position: absolute;
		top: 0%;
		left: 0%;
		width: 100%;
		height: 100%;
		background-color: black;
		z-index:1001;
		-moz-opacity: 0.8;
		opacity:.80;
		filter: alpha(opacity=80);
		}
		.white_content {
		display: none;
		position: absolute;
		top: 10%;
		left: 10%;
		width: 80%;
		height: 80%;
		border: 16px solid lightblue;
		background-color: white;
		z-index:1002;
		overflow: auto;
		}
		.white_content_small {
		display: none;
		position: absolute;
		top: 20%;
		left: 30%;
		width: 40%;
		height: 50%;
		border: 16px solid lightblue;
		background-color: white;
		z-index:1002;
		overflow: auto;
		}
	</style>
	</head>
<body class="main">
	<div class="wrap">
		<div class="">
		<ul class="breadcrumb">
		    <li><span id="test">您当前的位置：</span><a href="#">首页</a> <span class="divider">>></span></li>
		    <li class="active">${uplabellist}</li>
	    </ul>
		</div>
		<div id="div">
		<div class="">
			<table class="table table-bordered table-striped table-hover">
				<thead>
					<tr>
						<th>大分类名</th>
						<th>创建时间</th>
						<th>类别</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				<#if listuplabel?exists>
				<#list listuplabel as uplabeEntity>
					<tr>
						<td>${uplabeEntity.uplabel_name}</td>
						<td>${uplabeEntity.uplabel_date?string("yyyy-MM-dd")}</td>
						<#if uplabeEntity.uplabel_status == "E">
						<td>可用</td>
						<#else>
						<td>禁用</td>
						</#if>
						<td>
						<a href="javascript:selectLabel(${uplabeEntity.uplabel_id});">查看所属小分类</a>
						</td>
					</tr>
				</#list>
				<#else>
				   	 <tr>
				       <td colspan="6">没有查询到记录！</td>
				   </tr>
				</#if>
				</tbody>
			</table>			
		</div>
		</div>				
	</div>	
		<!--弹出层时背景层DIV-->
<div id="fade" class="black_overlay">
</div>
<div id="MyDiv" class="white_content">
</div>			
	<script src="../../resources/js/bootstrap.min.js"></script>
	<script src="../../resources/js/js.js"></script>
	<script type="text/javascript">
	function selectLabel(id){
    	$.ajax({url:"${webRoot}label/getLabelList.do?uplabelId="+id,
			   type:"get",
			   cache:"false",
			   error : function() {
				   alert("系统繁忙，请稍后再试！");
				},
			   success:function(msg){
				   $("#MyDiv").html(msg);
				   ShowDiv('MyDiv','fade');
			   }
			});
	}
	function pageHref(page,totalPage,pageSize){
    	var userBean = $("#uplabelId").val();
    	$.ajax({url:"${webRoot}label/getLabelList1.do?page="+page+"&pageSize="+pageSize+
    			"&totalPage="+totalPage+"&uplabelId="+userBean,
			   type:"post",
			   cache:"false",
			   error : function() {
				   alert("系统繁忙，请稍后再试！");
				},
			   success:function(msg){
				   $("#label").html(msg);
			   }
			});
    }
	//弹出隐藏层
	function ShowDiv(show_div,bg_div){
	document.getElementById(show_div).style.display='block';
	document.getElementById(bg_div).style.display='block' ;
	var bgdiv = document.getElementById(bg_div);
	bgdiv.style.width = document.body.scrollWidth;
	// bgdiv.style.height = $(document).height();
	$("#"+bg_div).height($(document).height());
	};
	//关闭弹出层
	function CloseDiv(show_div,bg_div)
	{
	document.getElementById(show_div).style.display='none';
	document.getElementById(bg_div).style.display='none';
	};
	</script>
</body>
</html>
